<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学生意见管理系统-菜单-首页</title>
    <th:block th:fragment="title">
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <link rel="stylesheet" type="text/css" th:href="@{/common/resource/bootstrap/css/bootstrap.min.css}"/>
        <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}"/>

        <script type="text/javascript" th:src="@{/common/resource/jquery-3.3.1.min.js}"></script>
        <script type="text/javascript" th:src="@{/common/resource/popper.min.js}"></script>
        <script type="text/javascript" th:src="@{/common/resource/bootstrap/js/bootstrap.min.js}"></script>
        <script type="text/javascript" th:src="@{/common/resource/util.js}"></script>
    </th:block>
</head>
<body>
<th:block th:fragment="header">
    <!-- 网页头部开始 -->
    <nav class="navbar navbar-expand-md navbar-light bg-light fixed-top">
        <a class="navbar-brand" th:href="@{/login}">学生意见管理系统</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse"
                data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false"
                aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" th:href="@{/login}">首页
                        <span class="sr-only">(current)</span>
                    </a>
                </li>
                <th:block th:if="${session.users != null}">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown"
                           role="button" data-toggle="dropdown" aria-haspopup="true"
                           aria-expanded="false">个人中心
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                            <a class="dropdown-item" th:href="@{/head/users/usersUpdate}">查看个人信息</a>
                            <a class="dropdown-item"
                               th:href="@{/head/users/usersUpdate?operType=updateInfo}">修改个人信息</a>
                            <a class="dropdown-item"
                               th:href="@{/head/users/usersUpdate?operType=updatePass}">修改密码</a>
                            <a class="dropdown-item"
                               th:href="@{/head/users/usersUpdate?operType=updatePhoto}">修改头像</a>
                            <a class="dropdown-item" onclick="return confirm('确认要退出吗?')" th:href="@{/head/users/logout}">退出</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown"
                           role="button" data-toggle="dropdown" aria-haspopup="true"
                           aria-expanded="false">意见管理
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                            <a class="dropdown-item" th:href="@{/head/opinionDesc/list}">意见列表</a>
                        </div>
                    </li>
                </th:block>
                <th:block th:if="${session.users == null}">
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/login}">登陆</a>
                    </li>
                </th:block>
            </ul>
            <!-- 小分辨率要藏起来 -->
            <!--  <form class="form-inline my-2 my-lg-0 hidden-sm">
                <input class="form-control mr-sm-2" type="search" placeholder="关键字"
                    aria-label="Search">
                <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
            </form>  -->
            <!--<th:block th:if="${session.users != null}">
                <ul class="navbar-nav">
                    &lt;!&ndash; 小分辨率要藏起来 &ndash;&gt;
                    <li class="nav-item navbar-text">
                        <a href="/head/users/mainmain?menu=1">
                            &lt;!&ndash;<c:choose>
                                <c:when test="${requestScope.response.data.one.photoPath != null&& requestScope.response.data.one.photoPath != ''}">
                                    <img src="${requestScope.websiteFileUrl }${requestScope.response.data.one.photoPath }"
                                         class="img-fluid rounded mx-auto" width="28" height="28">
                                </c:when>
                                <c:otherwise>
                                    <img th:src="@{/img/no_pic.png}"
                                         class="img-fluid rounded mx-auto" width="28" height="28">
                                </c:otherwise>
                            </c:choose>&ndash;&gt;
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a
                                class="nav-link dropdown-toggle" href="#" id="navbarDropdownRight"
                                role="button" data-toggle="dropdown" aria-haspopup="true"
                                aria-expanded="false">配置 <span class="sr-only">(current)</span>
                        </a>
                        <div class="dropdown-menu header-right" aria-labelledby="navbarDropdownRight">
                            <a class="dropdown-item" href="${ }/head/users/usersUpdatemain">查看个人信息</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="#" data-toggle="modal"
                               data-target="#logoutModal">退出</a>
                        </div>
                    </li>
                </ul>
            </th:block>
            <th:block th:if="${session.users == null}">
                <ul class="navbar-nav">
                    &lt;!&ndash; 小分辨率要藏起来 &ndash;&gt;
                    <li class="nav-item"><a class="nav-link" href="${ }/loginmain">登陆</a></li>
                    <li class="nav-item"><a class="nav-link" href="${ }/registermain">注册</a></li>
                </ul>
            </th:block>-->
        </div>
    </nav>

    <!-- 退出登陆的对话框 -->
    <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog"
         aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">提示信息</h5>
                    <button type="button" class="close" data-dismiss="modal"
                            aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    确认要退出吗?
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <a class="btn btn-primary" href="${ }/head/users/logoutmain">退出</a>
                </div>
            </div>
        </div>
    </div>
</th:block>
<th:block th:fragment="footer">
    <th:block th:if="${response != null && response.info != null && response.info != ''}">
        <!-- 提示信息 -->
        <div class="container">
            <div class="col-sm-8 col-sm-offset-1">
                <div class="alert alert-warning alert-dismissible fade show"
                     role="alert">
                    <button type="button" class="close" data-dismiss="alert"
                            aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                    <span th:text="${response.info}"></span>
                </div>
            </div>
        </div>
    </th:block>
    <footer class="footer mt-5">
        <div class="container">
            <div class="row">
                <div class="col-sm-11 col-lg-6">
                    <h4>
                        <!-- <img src="http://static.bootcss.com/www/assets/img/logo.png"> -->
                    </h4>
                    <p>
                        本网站所列开源项目的中文版文档全部由<a href="${ }/loginmain">学生意见管理系统</a>顶力开发 CC BY
                        3.0协议发布。
                    </p>
                </div>
                <div class="col-sm-11  col-lg-6">
                    <div class="row">
                        <div class="col-sm-3">
                            <ul class="list-unstyled">
                                <li class="mb-1">关于</li>
                                <li class=""><a href="#" class="text-muted">关于我们</a></li>
                                <li class=""><a href="#" class="text-muted">广告合作</a></li>
                                <li class=""><a href="#" class="text-muted">友情链接</a></li>
                                <li class=""><a href="#" class="text-muted">招聘</a></li>
                            </ul>
                        </div>
                        <div class="col-sm-3">
                            <ul class="list-unstyled">
                                <li class="mb-1">联系方式</li>
                                <li class=""><a href="#" class="text-muted">新浪微博</a></li>
                                <li class=""><a href="#" class="text-muted">电子邮件</a></li>
                            </ul>
                        </div>
                        <div class="col-sm-3">
                            <ul class="list-unstyled">
                                <li class="mb-1">旗下网站</li>
                                <li class=""><a href="#" class="text-muted">Laravel中文网</a></li>
                                <li class=""><a href="#" class="text-muted">Ghost中国</a></li>
                            </ul>
                        </div>
                        <div class="col-sm-3">
                            <ul class="list-unstyled">
                                <li class="mb-1">赞助商</li>
                                <li class=""><a href="#" class="text-muted">UCloud</a></li>
                                <li class=""><a href="#" class="text-muted">又拍云</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row">
                <div class="col-md-11 col-md-offset-1 text-center">
                    <ul class="list-inline">
                        <li class="list-inline-item"><a href="#"
                                                        class="text-secondary">京ICP备11008151号</a></li>
                        <li class="list-inline-item">京公网安备11010802014853</li>
                    </ul>
                </div>
            </div>
        </div>
    </footer>
</th:block>
</body>
</html>